﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using AppAcc.Models;

namespace AppAcc.FormDieuKien
{
    public partial class FormDieuKienSoNhatKyThuTien : Form
    {
        private PhanMenKeToanEntities1 db = new PhanMenKeToanEntities1();
        private int idtam = 0;
        public FormDieuKienSoNhatKyThuTien()
        {
            InitializeComponent();
        }

        private void FormDieuKienSoNhatKyThuTien_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'dS_GetListSoQuyTienMat.pr_GetListSoQuyTienMat' table. You can move, or remove it, as needed.
            this.pr_GetListSoQuyTienMatTableAdapter.Fill(this.dS_GetListSoQuyTienMat.pr_GetListSoQuyTienMat);
            cbbX_TK.DisplayMember = "TenTaiKhoan";
            cbbX_TK.ValueMember = "Id";
            cbbX_TK.DropDownColumns = "Id,TenTaiKhoan";
            cbbX_TK.DropDownColumnsHeaders = "Mã tài khoản\r\nTên tài khoản\r\n";
            getListTKDU();

        }

        void getListTKDU()
        {
            cbb_TKDU.DataSource = db.TaiKhoans.ToList();
            cbb_TKDU.DisplayMember = "TenTaiKhoan";
            cbb_TKDU.ValueMember = "Id";
            cbb_TKDU.DropDownColumns = "Id,TenTaiKhoan";
            cbb_TKDU.DropDownColumnsHeaders = "Mã tài khoản\r\nTên tài khoản\r\n";
        }
        private void bt_xem_Click(object sender, EventArgs e)
        {
            Views.BaoCaoChungTu.FormBaoCaoNhatKyThuTien f = new Views.BaoCaoChungTu.FormBaoCaoNhatKyThuTien(cbbX_TK.SelectedValue.ToString(),cbb_TKDU.SelectedValue.ToString(),dateTimePicker1.Value,dateTimePicker2.Value);
            f.ShowDialog();
        }
    }
}
